import { request, config } from 'utils'
import axios from 'axios'
import FileSaver from 'file-saver'

const { defaultPageSize } = config

/**
 * 公共的query组件
 * @param {*} param0
 * @author lz
 */
export async function commonQuery({
  apiBaseUrl,
  pageSize: limit = defaultPageSize,
  current: page = 1,
  sort,
  order,
  queryParam = {
  }
}) {
  const url = `${apiBaseUrl}/list/${queryParam.pageSize?queryParam.pageSize:limit}/${queryParam.current?queryParam.current:page}/${sort}/${order}/complex`
  return request({ url: url, method: 'put', data: {} })
}
